import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standard_scence_safe_third_assess_entity.dart';

StandardScenceSafeThirdAssessEntity $StandardScenceSafeThirdAssessEntityFromJson(Map<String, dynamic> json) {
  final StandardScenceSafeThirdAssessEntity standardScenceSafeThirdAssessEntity = StandardScenceSafeThirdAssessEntity();
  final List<StandardScenceSafeThirdAssessAmendmentList>? amendmentList = (json['amendmentList'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<StandardScenceSafeThirdAssessAmendmentList>(e) as StandardScenceSafeThirdAssessAmendmentList).toList();
  if (amendmentList != null) {
    standardScenceSafeThirdAssessEntity.amendmentList = amendmentList;
  }
  final String? checkPerson = jsonConvert.convert<String>(json['checkPerson']);
  if (checkPerson != null) {
    standardScenceSafeThirdAssessEntity.checkPerson = checkPerson;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    standardScenceSafeThirdAssessEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    standardScenceSafeThirdAssessEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    standardScenceSafeThirdAssessEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    standardScenceSafeThirdAssessEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    standardScenceSafeThirdAssessEntity.deleted = deleted;
  }
  final String? evaluateDate = jsonConvert.convert<String>(json['evaluateDate']);
  if (evaluateDate != null) {
    standardScenceSafeThirdAssessEntity.evaluateDate = evaluateDate;
  }
  final String? evaluatePerson = jsonConvert.convert<String>(json['evaluatePerson']);
  if (evaluatePerson != null) {
    standardScenceSafeThirdAssessEntity.evaluatePerson = evaluatePerson;
  }
  final String? fileAddressUrl = jsonConvert.convert<String>(json['fileAddressUrl']);
  if (fileAddressUrl != null) {
    standardScenceSafeThirdAssessEntity.fileAddressUrl = fileAddressUrl;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    standardScenceSafeThirdAssessEntity.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    standardScenceSafeThirdAssessEntity.name = name;
  }
  final String? thirdPartName = jsonConvert.convert<String>(json['thirdPartName']);
  if (thirdPartName != null) {
    standardScenceSafeThirdAssessEntity.thirdPartName = thirdPartName;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    standardScenceSafeThirdAssessEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    standardScenceSafeThirdAssessEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    standardScenceSafeThirdAssessEntity.updateDate = updateDate;
  }
  return standardScenceSafeThirdAssessEntity;
}

Map<String, dynamic> $StandardScenceSafeThirdAssessEntityToJson(StandardScenceSafeThirdAssessEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['amendmentList'] = entity.amendmentList?.map((v) => v.toJson()).toList();
  data['checkPerson'] = entity.checkPerson;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['evaluateDate'] = entity.evaluateDate;
  data['evaluatePerson'] = entity.evaluatePerson;
  data['fileAddressUrl'] = entity.fileAddressUrl;
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['thirdPartName'] = entity.thirdPartName;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension StandardScenceSafeThirdAssessEntityExtension on StandardScenceSafeThirdAssessEntity {
  StandardScenceSafeThirdAssessEntity copyWith({
    List<StandardScenceSafeThirdAssessAmendmentList>? amendmentList,
    String? checkPerson,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? evaluateDate,
    String? evaluatePerson,
    String? fileAddressUrl,
    String? id,
    String? name,
    String? thirdPartName,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return StandardScenceSafeThirdAssessEntity()
      ..amendmentList = amendmentList ?? this.amendmentList
      ..checkPerson = checkPerson ?? this.checkPerson
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..evaluateDate = evaluateDate ?? this.evaluateDate
      ..evaluatePerson = evaluatePerson ?? this.evaluatePerson
      ..fileAddressUrl = fileAddressUrl ?? this.fileAddressUrl
      ..id = id ?? this.id
      ..name = name ?? this.name
      ..thirdPartName = thirdPartName ?? this.thirdPartName
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}

StandardScenceSafeThirdAssessAmendmentList $StandardScenceSafeThirdAssessAmendmentListFromJson(Map<String, dynamic> json) {
  final StandardScenceSafeThirdAssessAmendmentList standardScenceSafeThirdAssessAmendmentList = StandardScenceSafeThirdAssessAmendmentList();
  final String? amendmentDate = jsonConvert.convert<String>(json['amendmentDate']);
  if (amendmentDate != null) {
    standardScenceSafeThirdAssessAmendmentList.amendmentDate = amendmentDate;
  }
  final String? amendmentUser = jsonConvert.convert<String>(json['amendmentUser']);
  if (amendmentUser != null) {
    standardScenceSafeThirdAssessAmendmentList.amendmentUser = amendmentUser;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    standardScenceSafeThirdAssessAmendmentList.companyCode = companyCode;
  }
  final String? correlationId = jsonConvert.convert<String>(json['correlationId']);
  if (correlationId != null) {
    standardScenceSafeThirdAssessAmendmentList.correlationId = correlationId;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    standardScenceSafeThirdAssessAmendmentList.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    standardScenceSafeThirdAssessAmendmentList.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    standardScenceSafeThirdAssessAmendmentList.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    standardScenceSafeThirdAssessAmendmentList.deleted = deleted;
  }
  final String? fileAddressUrl = jsonConvert.convert<String>(json['fileAddressUrl']);
  if (fileAddressUrl != null) {
    standardScenceSafeThirdAssessAmendmentList.fileAddressUrl = fileAddressUrl;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    standardScenceSafeThirdAssessAmendmentList.id = id;
  }
  final String? sort = jsonConvert.convert<String>(json['sort']);
  if (sort != null) {
    standardScenceSafeThirdAssessAmendmentList.sort = sort;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    standardScenceSafeThirdAssessAmendmentList.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    standardScenceSafeThirdAssessAmendmentList.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    standardScenceSafeThirdAssessAmendmentList.updateDate = updateDate;
  }
  return standardScenceSafeThirdAssessAmendmentList;
}

Map<String, dynamic> $StandardScenceSafeThirdAssessAmendmentListToJson(StandardScenceSafeThirdAssessAmendmentList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['amendmentDate'] = entity.amendmentDate;
  data['amendmentUser'] = entity.amendmentUser;
  data['companyCode'] = entity.companyCode;
  data['correlationId'] = entity.correlationId;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['fileAddressUrl'] = entity.fileAddressUrl;
  data['id'] = entity.id;
  data['sort'] = entity.sort;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension StandardScenceSafeThirdAssessAmendmentListExtension on StandardScenceSafeThirdAssessAmendmentList {
  StandardScenceSafeThirdAssessAmendmentList copyWith({
    String? amendmentDate,
    String? amendmentUser,
    String? companyCode,
    String? correlationId,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? fileAddressUrl,
    String? id,
    String? sort,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return StandardScenceSafeThirdAssessAmendmentList()
      ..amendmentDate = amendmentDate ?? this.amendmentDate
      ..amendmentUser = amendmentUser ?? this.amendmentUser
      ..companyCode = companyCode ?? this.companyCode
      ..correlationId = correlationId ?? this.correlationId
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..fileAddressUrl = fileAddressUrl ?? this.fileAddressUrl
      ..id = id ?? this.id
      ..sort = sort ?? this.sort
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
